Skip to main content

mobileGetDeviceToken

Type

function

Summary

Returns the Device Token used for Push Notification.

Syntax

mobileGetDeviceToken()

Description

Use the mobileGetDeviceToken function to return the Device Token that is used by the Push Notification Server to identify to which device to send a notification.

LiveCode registers for push notifications with the operating system when your application starts. The operating system sends a callback message pushNotificationRegistered to your application once registration is complete.

Important

The mobileGetDeviceToken function returns empty until registration for push notifications with the operating system is complete.

As a result, the mobileGetDeviceToken function should be called when you handle the pushNotificationRegistered message.

Examples

on pushNotificationRegistered
get mobileGetDeviceToken()
end pushNotificationRegistered

glossary: message

message: pushNotificationRegistrationError, pushNotificationRegistered, pushNotificationReceived

Compatibility and Support

Introduced

LiveCode 5.5

OS

ios

android

Platforms

mobile

Thank you for your feedback!

Was this page helpful?